work with main gui