added comments, new tests and updated solutions