Functionalising more code