Updated with the latest source code from class