use doubles for calculation