refactored with, added assign function