Use array_shift to get first element of hash instead of [0]