change to use opts