added argument checks to change visibility