refacto with visibility