added BIT and RMQ