implemented basic IO, print and read functions