Why not make this a command argument?  That would make this much more reusable.