implement backend logic with redis