typeclass system to have different strategies to represent code result