added im2double