removed temp. array