added saving and ui