Changed system to Double from ints.