date and directoy as arguments