fixed bug when passing multiple whereEquals attributes
updated version