refactoring pen_m test