class version

rewrite to class mode and add find,lower_bound,upper_bound function.