adding some changes to visibility, funcs and gcm