Some random code segments ...