added task_3 by @motjuste
TODO: improve plotting