added generic default implementations and generic versions of numeric api functions