fix update code and add pdf support
fix merge conflicts