removed main from funct