BatesLab Code