various bug fixes
updating examples