Added usage of arguments. Better implementation of conditions (using case).