added example script for timeharp and wrote function documentation