Write [] method