implemented show hide functionality