made new function to put code into