applied changes suggested after code review