Make plugin more flexible