damn I was just gonna post the very same refactoring =)