commented source and updated tests