refactored avatar generation. first step