add bages and add some asserts in tests