I'm not sure how this should be implemented, suggestions welcome.