Commented out the older version. The rules one is close to working the way I intended it