updated more robust configuration