alternative approach to remove snippet dependency