bunch of internal api to accomodate rules