Added variable within function

Added variable within function