added file opening, implicit saving