added functor+pickle example
pad with ratio, various improvements from Juska and Matthieu