simplified API, fixed to work with some plugins