separate core csp and util functions