Inputted arguments

Arguments are now checked in a function.