Modified between to allow for additional parameters such as all_until and all_before