added auto-solve feature