Added where support and fixed need of orderBy argument