rewritten spec tests

complete rewritten spec tests