correcting mongodb query