re-organised solution