Removed the untested code and tested it