Fixed up formula to make it more compact