refactoring
a little bit of simplification