added function that write date on picture