add storeCommand template

add method storeCommand in the class Logic