Avoiding creation of unnecessary variables