more stubs and clean some hacky codes