added return, newarray, arraylength
merge fix