changed method to get avatar