finalized changes to raw.py