lbd example code