poor attempt at gui programming