refactoring staff rendering logic