implemented tb_system.cpp for BATB