merge functions with the same content and replace calls
4133 to 2826 lines dot