improved efficiency by avoiding redundant operations

of course that variable name is rather ... unimaginative - suggestions
welcome