it's an anonymous class, couldn't find a better way