fixed a bug in initialization
fixed puzzle creation algorithm