finally implemented hide and show