added changes from peer code review