add functions to free