utility programs in scala