rewrote consumer.py and some data module functions