added more test stubs and a bug fix