add gui, writing lib