added handling for $s