fixed display_attribute logic, turned conditional branch to case statement