Removing an unnecessary variable