adding auto detection support, and making sure defatlt is set