made getRules function public