Same comment as above. You can remove returned arrays if they are passed as a parameter and only their elements are modified through out.