add strategy design pattern.