adding sampling resolution parameters to make bin optimization faster,
fix #2