factory patter final structure