code update based on code reviews