added libs and basic functions