WORKING VERSION DOUBLE AND FLOAT