split into test and main