removed some duplication