added test maximise function