changed around things to support ddifferent configurations better