basic implementation using redis as database