implemted console in lib