gen code for running on local machines