function 1-3 work now and possibly 4