removed duplication; keepin it dry