unread functionality fully working on database level now