Added save utility and base hierarchy classes
merged solution between non save function and save function