added error-checking that doesn't work yet...
commit msg