compartmentalisation and adding run if statement