added improved version