cleanup and documenting