more functional implementation of visible method