changed all int's to doubles