fixed between, added some test cases