starts function running automatically with setInterval (first nom package)