removing drawPath from the updateForm function