generality to the function solve

Generality is added to the function solve can pass other parameters