solve method works!