Created a helper function file in core