Allow user to specify the step interval

* Defaults to 1 second interval if step parameter is not provided or if invalid value
* Added test cases