why does this code fail to initialize?