refactor
added rules template