implemented changes from review #143