resolves #23 : code encapsulation of show and hide
fixes bugs introduced in #11