using coordinates[1], coordinates[0] instead of reverse()