Changed train method to take two data lists