added sanity check in opts