removed unnecessary pattern match