added test and comments after first round of reviews