move plugin function into separate level