implementation state design pattern