delete class mainblock