used array_get to make code beautiful