added unapply method, in order to get scala pattern matching