added input and output interfaces