Solution for the Lookout CodeEval Challenge