You might want to avoid re-assigning to 's' here. Could you use a new variable here instead of re-using 's'?