using scalaz tagged types instead of our own