Implemented functionality to pass tests