Port the helper method