fixes #546 config arg

addedconfig argument cleaned up code