implemented either sequence in a different way - using pattern matching.