refactord spec & conversions(lib)