add attr_accessor
add and refactor specs