changed checknotebook to get derivites for positions into script