all code from previous work