Implemented some functions