added check for coordinate format