add source code, still have bugs