csrf: refactor