Added automatic assignment creation logic