Cleaned and changed Input and Output