Added code from class