[refactory] changed libs to functional way