added functionContext parameter into all functions to avoid renaming labels inside optional/duplicated functions