messed up how i check for val in dict