make functions do what is needed