refactor globals, similarity, and support period