application factory for loading different configurations