fixed mistakes & updated for the latest version