Importance of Writing Only A Single Task in a Function