refactored and introducet set point