updated constants to private
removed some comments
parallel support
throw exception
log to file