Added isvisible function