start refactor of get_center