Updated for QGIS