solving a double problem