added logic
add docs