Could you write a small program that does that?