header: input/output functions added