adding code from class