rewrite underscore dependent code