start of avatar solution