should not use PartialFunction

https://twitter.com/xuwei_k/status/397560028359442433
https://twitter.com/xuwei_k/status/397565143686459392