shifts are now safe, updated python dictionaries