based on Alan McIntyre work