added GUI code