added double-conversion and some tests