added remove functionality to the remove button for removing a resource