revert to inline code to avoid being blocked by security policies