snippit function change