add misc code