main functions scheleton