Implemented the requested functions