make my 'with' code better