made sort an optional param on get all