removed unecessary object creation, and used existing variable instead