dynamic main; without empty buttons