add automated tests with guard