Trial and error script from google