New work

All functions now working