Updated for arbitrary spacing (shh it's a secret!)