refactor snippet organization
added print snippet