Very ugly code but printing slides