added command structs and adding function