cleanup and doucment