added comments + remove extra whitespace
update test