TODO: fix request generation