[code] simpler way to print image in the center