added overflow handling to example, fixed typo