refactored lib code
refactored test
fixed test assertion values
fixed deps