rebuilding object array