functions now work (for the second time)