Replaced the slow function call array_push() with the ordinary way of element addition