compartmentalise functions