Issue 790: initial commit

Created codes() method. Please review it.
what this line is for? I didn't get it