adding rules and styling