probably better to rename opts by 'options', clearer?