working on refactor and rule additions