Adding hide logic