updated tests and added comments