preparing snippet