rewrote batch, cleaned up a show function