fixed after code review (and tested)