Updated extendedmethods to be more robust