done, with comments :)