methods inside of functions