changed action to one post function