fixed options to use opts object