sorted out automated testing and added initial tests