made  a function