Added shape tests. Added param check to prevent rule from executing
twice in a row with the same params.