added hash option to getPaglist function