add main, just partially