make main() clearer