Use extension length instead of hard coded number