Changed to plugin & added timeUnit option