middle source code