updated after 1 level code review