adding snippet support, still needs some work