Implemented functions and commented