tweak webapi to match nodejs