Updated based on code review