no need for premature optimizations - changed back to integer