rolfl solution for CodeReview WEC#3