refactor, added rules additions and comments