remove unnecessary array calls