add functions definitions