Added more functionality.

Changed from ints to doubles.