added some basic functions for boolean indexing