update index
convert to object oriented component