take a simple snippet and make it useful