rationalised and documented code