removed recursion 

removed recursion to make it a bit faster.
//todo min version must be regenerated.