updated bd_read with mock function