modularized main to avoid namespace pollution