CS1D source code