added getAll function and move saving to manager