added code from previous base