Though there is probably not a case where we divide by zero here, its probably better coding wise to check. I suggest you create a helper method and move that logic there.