updated research codes used before.