added new snippet and some minor corrections