updated reassign code