Found a more flexible way to customize output