tidy logic
add examples
tidy simple example
add build option