add generate code to work
review with AJ 31/10/2013