added update component function