updated code for mentor