Incorporating @ogrisel's comments for simplification