fixing Undocumented S4 methods warning and no visible global function definition notes