modified recommend logic