updated BIC to take data argument (optional)