added switch for date vs epoch