modified to work for KDE