useless empty array elemnts removed