Patch Set 2:

so would there be another way to easily do the same thing? if it's just a few lines i'd be ok with copy pasting this code. however i feel that this is a not-really-so-trivial thing to do... right?