if this does what i think it does then this is my favourite code