added dirty option to ag plugin