replacing array_push with faster []