added tries left functionality