separated test and main