rewrite using travis api