Remvoe spaces from function