fixing some bugs, adding some commands