code cleanup
more cleanup
update example, signature change