added misc code