implement forgotten add_coordinates function