Working version of gui