added input and other functions