optimizations and comments
arithmetic shifts