simplified post controller by removing references of json