updated main code to add remove functions