implemented batter device and add test case