improve the structure of spec