more improvements, adding random secret