get and use max extent from config file rather than hard coding it