fixed wrong method name; check for interface instead of class