Mediovaigel has a bug, but here is an idea.