introducing the forgotten trim function for the keyness class