main and packages