Added automatic testing functions