snippet can be nil