some useful functions and classes for programming