using the new sentic api
updating example and organizing some code