implemented code review feedback