big decimal used instead of double to make more precise calculations