still tweaking new python functions