replaced a ceil with a bit shift op.