add OpenMP support
fix parameter setting bug