adding GUI and additional conditions