Same problem solve using the Strategy pattern