modularize pub and priv
update example