Initial implementation of python functions