finalize gui