remove whitespace
port over the JS