refactored test
refactored lib code
fixed deps in p.json
corrected values and passing tests