Adding assignment logic for test clarity