main is a function now