Creating sigrules function