implemented index style assign and construct