fix a bug, testing is not yet finished