Add solve method