integrate util function togglevisibility