several changes in code

- included possibility to choose time interval
- java.util.Timer replaced with java.util.concurrent.Executors
- change in error handling
- comments added