many bugs fixd, but still some errors