My very inefficient solution.