Some changes from int to double