replaced string to int with simpler code
fixed up unit module
all tests passing