working spec tests, need way more tests though