replaces weird method with unit tested sanity