returns res instead of headers