delete unused code
add docs