Reading input, creating and calling functions