added task_2 by @motjuste
TODO: improve plotting