updated to bottle plugin API v2