Small refactoring
Solving logic issues
Solving same logic issue