some minor changes connecting gui with logic