implemented two list operations