2nd version based on keystone