adding new code to learn bil models