All functionalities working code