now passing trail options as array instead of separate parameters