various pieces of code