adding almost-final GSOC code of Giang