Sam and Neel - Working solution