added printLabel function