Better quakes generating function. Fixes #3