formatting changes and using hash now (h/t jacob)