moved stock stuff to util.py