Improved snapall function