new spec and bug fix.
use Object instead of array because it might be immutable in game.