added control to fail or not on missing key
made split 'smarter' but still overridable