complete logic on upload avatar