gentle code refactor