source code for snap module