made a function