add post edit and delete, fix some bugs