added conditional hide and show to cursor