Making a little more dynamic so you can get different keys instead of just total