added snippet insertion interface