changed floor to ceil for initial coordinates
coordinates to stdout instead of arbitrary file