prepared some functions for ICode