Not actually what I want to do, but gives an idea