make activity in a function