add inference logic to gruntfile