removed globals except linq. added context option to where clause