removed an extra substr call