Removed optimization because it didn't work