added optional params on public profile function