tidy implementation of copyswatch