more compact way of printing 10 times