tech blog 5 refactor