enhance logic