Doc for 2 main functions