Code snippets for mbps