check initialize main finalize end