This seems a very simple function, certainly it can be used inline.