fixing bens terrible code