new functions included, old main is preserved