part of codes written in my research