added reassign function
added reassign function