added console IO