used 'cut' to replace lambdas for better working