snaps and code for routes