get rid of trailing whitespace.
add collection handling capability.