visible attribute refactor