added a consumer functionality (still bugged i think)