implemented visibility flag