change the name s to l
make the logic clearer
some refactor