First version with arguments checked.
Programming assignement 3