use dict.pop() instead of get+del