writeInstance; new viewAppo

added writeInstance; new viewAppo