You sure this is not an overkill? I'd rather avoid reinventing the wheel...