add rule and task