Various efforts ([?, ?, ?]) have been made in recent years to derandomize probabilistic algorithms using the complexity theoretic assumption that there exists a problem in E = dtime(2O(n) ), that requires circuits of size s(n), (for some function s). These results are based on the NW-generator [?]. For the strong lower bound s(n) = 2 n , [?], and later [?] get the optimal derandomization, P = BPP. However, for weaker lower bound functions s(n), these constructions fall far short of the natural conjecture for optimal derandomization, namely that bptime(t) dtime(2O(s-1 (t)) ). The gap in these constructions is due to an inherent limitation on efficiency in NW-style pseudo-random generators. In this paper we are able to get derandomization in almost optimal time using any lower bound s(n). We do this by using the NW-generator in a new, more sophisticated way. We view any failure of the generator as a reduction from the given "hard" function to its restrictions on smaller input...