Added code so less repetitive