fixed the post function