refined the method and documented it