merge functions into h files