further implementation of data structures
extended data structures
added state permission control to commands