move req statement to the top