improve method for hooking into non-array instances