Added setting and functions for retries if it doesn't pass