favor pattern matching instead of if statement
remove unneeded seq
comments