added qDebug() commands to provide console output