made the type declarations of addTo and removeFrom more readable