driver code from teacher