Make use of this code as you please, but please give credit when and where appropriate.