integrated hiredis api and wrote front-end c