In progress - all functions work now though