Added main functions