fix: accept negative values
add finally block to try statements and close scanner in it