Doubler function modified. Typo corrected.