fix quality flaws and SRP