corrections to coordinate code, unittests