edited codes_data.py to work with block data