Updated behavior code