add functions module for both master and slave usage