ex4 semi done, used get instead of post, just for demonstration