add source code, initial version 1.2