update to use options instead of opts