add auto assign logic preparation code