got js timer working for repeating function calls