Update method to support contexts

Add travis and demo test