Added main_function