changed stubs to working code