added feature from 5750 with whitespace fixing.