initial code from class