Implemented all the stuff