allow is_input and is_output to be methods