added code for automated tests