add test & middlelayers