setup detail view initial state