CGIV-1595 move set function to library and remove debug