refactor avatar to use relative coordinates