some tweaking in gaussMatch