updated method to process and parse connection options