solve doubles