placed variables in the function