Update main functions