updated riddle logic