changed setInterval to setTimeout
Added passing parameters as object

You can now pass parameters as object notation, wich helps better
readability.