implemented getObjectSchemas and refactored