trial selector code