Added functionality for doubles.