better support for where condition: now we can send in an initial where
fix incorrect reference to corebosapi object