starting to work on rule api