Updated code to match new rules