added option to remove spaces