Moved function definition from header file to nc