added functions cpp