destroyed unneded function, added ceil to transform_into_grid_coordinates