added delete function for gem and added more tests