simplify api
add documentation