improve code (code review fixes)