Math is easy to implement, but my code is too long looking!