solve almost all the problem