Added DPI code