add better error handling for creating marks