some work on main