rework structure, preview in separate thread