update type for attribute