added showbar function