publish finally works, still have to clean up the ui a bit