uses ryan's constants