removed unused code; added restriction