add two main functions