solve some bugs for matching period / site + finalize test