changed to using attribute errors
changed to using attribute errors
adding in more tests