factorize hide empty staff code