remove console.log
add example and corresponding test