refactored graphics