Add main functions