Modified, solved bugs and made it for final state.Modified, solved bugs and made it for final state.