this is the code I use for my research