Solution for Lifesum interview challange