reverted back to doing two ajax requests.