way better using array index