preview and add_edit_rule are used by add and rule method. If we want to combine them, the main file wil be larger and code will be duplicated.