final version with get post working