external inputs and printing functions