split main from tests