re-wrote logging system & added examples