stores yos in database and updates handling logic