implemented the adaptors the persistence layer and error handling