change the view and trim some codes