Added Function

Changed the var process to a function.