refactored graf elements