refactor, making graphelement implement FriendlyResource