added two rules and time measurement