Fixed and extendend  extract classes program