added a bunch of automated tests