better handling and documenting