of course, there is code already in place for that