This whole method has bad code smell, it's overly verbose and could easily be rewritten to not have all this "copied" logic in it.