fixed num states in code