updated for latest ctrulib