small pieces of useful code