squashy code down a bit and fixed it