added x::xs patterns