[addded]createCell and checkDupCell functions