refactored screen rendering