fix bugs; add POST method