added a lib file with a single helper function