using a regex instead of a huge condition
remove debug output