Nonlinear q-ary codes : constructions and minimum distance computation