new code with graphs as published