changed post to get in js