setDynamic methos