updated with time check

used commons.net library