main for opn