probably if you'll shift parameters, there would be no need to take a substring