implement all method except remove. Remove is partially written, however the algorithm to find a replacement is very tricky, and needs to be carefully thought through