inplement basic avatar function