refactoring
refactoring + comment
update type to library
refactoring + test