added the remaining actions and fixed some bugs