add ide helper
follow upstream, refactor code