changed to support no pre population scenarios. happens when there is no where clause