function function created. I need to make some changes in variables function