added input function