I *really* need to fix the visibility function