edit subroutine sc_setup_coord()